Ext.ns("main");

Ext.setup({
	icon: 'icon.png',
	glossOnIcon: false,
	tabletStartupScreen: 'tablet_startup.png',
	phoneStartupScreen: 'phone_startup.png',
	onReady: function() {
		
	//	first.init();
	//	second.init();
		map.init();
		fav.statics.init();
		main.panel = new Ext.Panel({
			fullscreen: true,
			cardSwitchAnimation:"slide",
			layout:'card',
			dockedItems:[{
				dock : 'bottom',
				style : 'background:#aaddaa; padding:10px;',
				xtype: 'tabbar',
				items: [cardMap , { xtype:'spacer' , width: 20 } ,cardFav , { xtype:'spacer' , width: 20 } , cardReg , { xtype:'spacer'  } , cardLogin]
			}],
			items:[map.panel.main],
		});
	}
});

var cardMap = {
	xtype: 'tab',
	text:'주변 검색',
	baseCls:'x-tab-base' ,
	handler: function(btn , event) {
		map.init();
		main.reload = true;
		main.goPage('' , 'slide');
	}
};

var xt_spacer = {
	xtype: 'spacer',
	height: 50
};

var cardReg = {
	xtype: 'tab',
	text:'신규등록',
	baseCls:'x-tab-base' ,
	handler: function(btn , event) {
		reg.panel.make.addCarc();
		main.goPage('paddCarc' , 'slide');
	}
};

var cardLogin = {
		xtype: 'tab',
		text:'환경설정',
		baseCls:'x-tab-base' ,
		handler: function(btn , event) {
			reg.panel.make.login();
			main.goPage('plogin' , 'slide');
		}
};

var cardFav = {
	xtype: 'tab',
	text:'즐겨찾기',
	baseCls:'x-tab-base' ,
	handler: function(btn , event) {
		fav.panel.make.list();
		main.goPage('pfavlist' , 'slide');
	}	
};